class Permisssion < ActiveRecord::Base

  def  self.add(role_id , url , name)
    sql ="insert into permisssions (role_id , url , name)  values("+role_id+",'"+url+"','"+name+"')"
 # puts sql 
     if  ActiveRecord::Base.connection.execute(sql)
       return true
     else
       return false
     end
  end
       
  def self.del(role_id , url)
    sql ="delete  from permisssions where  role_id ="+role_id+" and  url ='"+url+"'"
  # puts sql
     if  ActiveRecord::Base.connection.execute(sql)
         return true
     else
        return false
     end
  end
  
end
